//
//  SDBaseSessionData.m
//  SKinDiary
//
//  Created by pcyang on 16/7/24.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "SDBaseSessionData.h"

@implementation SDBaseSessionData


+(id)modelFromResponseValues:(id)infos error:(NSError**)error
{
    return infos;
}

- (id)resetWithResponseModel:(id)data
{
    if([data isKindOfClass:[NSDictionary class]])
    {
        _session = [[SDSessionModel alloc] initWithInfo:[data objectForKey:@"session"]];
        NSDictionary* user = [data objectForKey:@"user"];
        if (CHECK_VALID_DICTIONARY(user)) {
            _userInfo = [[SDUserInfoModel alloc] initWithInfo:user];
            _userInfo.uid = [[user objectForKey:@"id"] stringValue];
        }
        
    }
    
    return data;
}
@end
